package org.example.fanruan;


import sun.misc.Launcher;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;

public class TextSort {
    public static void main(String[] args) throws IOException {
        long l = System.currentTimeMillis();
        StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        boolean[] init = new boolean[10000000];
        int token = in.nextToken();
        int x = (int) in.nval;
        while (token != StreamTokenizer.TT_EOF && x != -1) {
            init[x-1] = true;
            token = in.nextToken();
            x = (int) in.nval;
        }
        StringBuilder buffer = new StringBuilder();
        for (int i = 0; i < init.length; i++) {
            if (init[i]) {
                buffer.append(i+1).append("\n");
            }
        }
        System.out.println(buffer);
        System.out.println(System.currentTimeMillis() - l);


    }
}
